package com.xyazm.order.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xyazm.common.dao.BaseDAO;
import com.xyazm.order.domain.entity.AfterSaleLogDO;
import com.xyazm.order.mapper.AfterSaleLogMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 售后单变更表 DAO
 * @author xuyou
 * @date: 2022/6/29 14:49
 */
@Repository
public class AfterSaleLogDAO extends BaseDAO<AfterSaleLogMapper, AfterSaleLogDO> {

    /**
     * 根据售后单号查询售后单变更记录
     * @author xuyou
     * @date: 2022/7/21 16:53
     * @param: afterSaleId
     */
    public List<AfterSaleLogDO> listByAfterSaleId(String afterSaleId) {
        LambdaQueryWrapper<AfterSaleLogDO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(AfterSaleLogDO::getAfterSaleId, afterSaleId);
        return list(queryWrapper);
    }
}
